Whirlwind
Generation I If Whirlwind is used in a wild Pokémon battle by a Pokémon on either side, the battle will automatically end. In a Trainer battle, Whirlwind has no effect. Whirlwind has 85% accuracy and normal priority. If the user's level is less than the target's level, there is a chance that Whirlwind will fail. More specifically, the chance of failing is FLOOR(T'' / 4) / (''T + U'' + 1), where ''T is the target's level and U'' is the user's level. This means that the chance of failure is always between approximately 12.5% and 25%, with a higher chance when the target's level is much greater than the user's. Generation II When in a Trainer battle, Whirlwind will now force the target to switch with a randomly chosen Pokémon from its Trainer's party. If there is no Pokémon for the target to switch with, Whirlwind will fail. Whirlwind's accuracy is increased to 100% and its priority is decreased to -1. If Whirlwind is used before the opponent can make its move, Whirlwind will fail. Whirlwind can now hit Pokémon during the semi-invulnerable turn of Fly. Whirlwind's chance to fail does not apply to Trainer battles. However, in Trainer battles, Whirlwind will always fail if used before the opponent has made its move. Generation III to IV Whirlwind will fail when used against Pokémon with the Ability Suction Cups or rooted by Ingrain. It no longer fails if it is not used last. It will now fail to hit Pokémon during the semi-invulnerable turn of Fly. If the user's level is less than the target's, the chance of failure is now calculated slightly differently. Given the terms ''T for the target's level, U'' for the user's level, and ''X for a random integer from 0 to 255, a term R'' can be calculated where ''R = FLOOR( ( T'' + ''U ) * X'' / 256 ) + 1. If ''R is less than or equal to T''/4, Whirlwind fails. The chance of Whirlwind failing can generally be approximated by ( ''T / 4 + 1 ) / ( T'' + ''U ); the chance of failing may diverge moderately from that approximation for low values of T'' and ''U. Whirlwind now has a priority of -6. Generation V In wild Pokémon battles, Whirlwind will now always fail if the user's level is less than the target's. In Trainer battles, Whirlwind will now succeed if it hits, regardless of either Pokémon's level. Whirlwind is now reflected by Magic Coat and Magic Bounce. If a battle with wild Pokémon ever involves more than one Pokémon on each side of the battle, Whirlwind will fail if used by the player's Pokémon against a wild Pokémon, but if a wild Pokémon uses it against the player, it will force the target to switch with another Pokémon in the Trainer's party, regardless of the target's level. Generation VI onward Whirlwind now bypasses accuracy checks to always hit, unless the target is in the semi-invulnerable turn of a move such as Dig or Fly. Whirlwind can now hit a target even if it has used Protect, Detect, or Spiky Shield, but will fail if the target is protected by Crafty Shield. Whirlwind can be used as part of a Contest Spectacular combination, with the user gaining an extra three appeal points if any of the moves Spikes, Stealth Rock or Toxic Spikes was used in the prior turn. If powered up by a Normalium Z into Z-Whirlwind, the user's Special Defense stat rises by one stage.